package com.cmcc.example.face.noSdk.common.vo.request;

import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import sun.misc.BASE64Encoder;

import java.io.IOException;

/**
 * <p>
 * <name>FaceMatchVO</name>
 * 人脸比对请求传输对象
 * </p >
 *
 * @author arabira
 * @version 1.0 2020-04-01
 * @since 1.0
 */
@Data
public class FaceMatchVO {
    private String imageFile1;
    private String imageFile2;

    public FaceMatchVO() {
    }

    public FaceMatchVO(MultipartFile image1, MultipartFile image2) throws IOException {
        this.imageFile1 = new BASE64Encoder().encode(image1.getBytes());
        this.imageFile2 = new BASE64Encoder().encode(image2.getBytes());
    }
}